#ifndef __EEPROM_I2C_H
#define __EEPROM_I2C_H

#include "stm32f4xx.h"

#define EEPROM_SCL  	PBout(8)
#define EEPROM_SDA_IN	PBin(9)
#define EEPROM_SDA_OUT	PBout(9)


extern void EEPROM_I2C_Init(void);
extern void EEPROM_Sda_Mode(GPIOMode_TypeDef mode);

extern void EEPROM_I2C_Start(void);
extern void EEPROM_I2C_Stop(void);
extern void EEPROM_I2C_Send_Ack(u8 ack);
extern void EEPROM_I2C_Send_Byte(u8 txdata);
extern u8 	EEPROM_I2C_Recv_Ack(void);
extern u8 	EEPROM_I2C_Recv_Byte(void);

extern void EEPROM_I2C_PageWrite(u8 addr, u8 *write_buff, u8 len);
extern void EEPROM_I2C_BufferRead(u8 addr, u8 *read_buff, u8 len);

#endif
